package org.mcb.zebra.portal.window;

import javax.portlet.PortletMode;
import javax.portlet.WindowState;

import org.apache.pluto.PortletWindow;
import org.apache.pluto.PortletWindowID;

public class ZebPortletWindow implements PortletWindow{
	protected static String DEFAULT_MODE="view";
	protected static  String DEFAULT_STATE="normal";
	public static PortletWindow getPortletWindow(String context,String portletName,PortletWindowID windowID){
		ZebPortletWindow window = new  ZebPortletWindow();
		window.setContextPath(context);
		window.setPortletName(portletName);
		window.setId(windowID);
		window.setPortletMode(new PortletMode(ZebPortletWindow.DEFAULT_MODE));
		window.setWindowState(new WindowState(DEFAULT_STATE));
		return window;
	}
	private String contextPath;
	private String portletName;
	private PortletWindowID id;
	private PortletMode portletMode;
	private WindowState windowState;
	/*
	 * (non-Javadoc)
	 * @see org.apache.pluto.PortletWindow#getContextPath()
	 */
	@Override
	public String getContextPath() {
		return contextPath;
	}
	/*
	 * (non-Javadoc)
	 * @see org.apache.pluto.PortletWindow#getId()
	 */
	@Override
	public PortletWindowID getId() {
		return id;
	}
	/*
	 * (non-Javadoc)
	 * @see org.apache.pluto.PortletWindow#getPortletMode()
	 */
	@Override
	public PortletMode getPortletMode() {
		return portletMode;
	}
	/*
	 * (non-Javadoc)
	 * @see org.apache.pluto.PortletWindow#getPortletName()
	 */
	@Override
	public String getPortletName() {
		return portletName;
	}
	/*
	 * (non-Javadoc)
	 * @see org.apache.pluto.PortletWindow#getWindowState()
	 */
	@Override
	public WindowState getWindowState() {
		// TODO Auto-generated method stub
		return windowState;
	}
	protected void setContextPath(String contextPath) {
		this.contextPath = contextPath;
	}
	protected void setId(PortletWindowID id) {
		this.id = id;
	}
	public void setPortletMode(PortletMode portletMode) {
		this.portletMode = portletMode;
	}
	protected void setPortletName(String portletName) {
		this.portletName = portletName;
	}
	public void setWindowState(WindowState windowState) {
		this.windowState = windowState;
	}
}
